home *** CD-ROM | disk | FTP | other *** search
- Path: news.u.washington.edu!gah
- From: gah@u.washington.edu (G. Herrmannsfeldt)
- Newsgroups: comp.lang.c
- Subject: Re: Why isn't return address in the stack protected?
- Date: 1 Feb 1996 21:25:20 GMT
- Organization: University of Washington
- Message-ID: <4erb40$7eb@nntp5.u.washington.edu>
- References: <DLo4xF.MH@un.seqeb.gov.au> <1996Jan24.032914.8805@ohstpy> <4e5qfv$1587@ns.RezoNet.NET>
- NNTP-Posting-Host: saul2.u.washington.edu
- NNTP-Posting-User: gah
-
- I agree that staying in bounds is the programmers responsibility, but I
- think also that sprintf should not be written this way. It is sometimes
- difficult to predict the size of an output string from sprintf, and one
- should not be forced to allocate the maximum possible size.
-
- Note that a floating point number in %f format could take a very large number
- of characters to describe. There are machines with floating point numbers
- in the 10^4000 range, or so, which could take 4000 characters if printed in %f.
-
- Maybe we need sprintfn(format,size,arg1...);
-
- -- glen
-